home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2000 February
/
PCWorld_2000-02_cd.bin
/
Software
/
Vyzkuste
/
xsetup
/
_SETUP.2
/
Group3
/
XQ Explorer Drive Hide.xpl
< prev
next >
Wrap
Text File
|
1999-09-14
|
3KB
|
114 lines
"FILE"="Xteq Systems X-Setup Plugin 5.0"
"TYPE"="6"
"COUNT"="5"
"UIPATH"="Appearance\Explorer\Options"
"NAME"="Hide Drives"
"VERSION"="1.40"
"LANGUAGE"="VBScript"
"TEXT 1"="Hide A:\ + B:\"
"TEXT 2"="Hide drive C:\"
"TEXT 3"="Hide drive D:\"
"TEXT 4"="Hide drive E:\"
"TEXT 5"="Hide drive F:\"
"DESCRIPTION 1"="Maybe you don't want that all drives are visible inside the Windows Explorer."
"DESCRIPTION 2"="In this case, simply select the drives that should be hidden and they won't be visible anymore."
"DESCRIPTION 3"="If you are using Internet Explorer 4.0, you need to restart before the changes are visible."
"AUTHOR"="Xteq Systems"
"COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
"COMMENT 1"="For more information, go to http://www.xteq.com or write to TeXHeX@xteq.com."
"COMMENT 2"=" "
"COMMENT 3"="Thanks to Pierre Szwarc [mailto:szwarc@usa.net] for reporting the "wrong datatype" bug."
"COMMENT 4"="Thanks to Dusty Phillips [dustyphillips@yahoo.com] for reporting the second "wrong datatype" bug."
sP="HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\"
sV="NoDrives"
i=0
Sub Plugin_Initialize
if RegPathExists(sP) then
i=RegReadValue(sP&sV)
if IsEmpty(i)=true then
'No drives hiden - don't read anything
else
'not empty - check if wrong datatype
if len(i)>0 and IsNumeric(i)=true then
if i=0 then
'no drives hidden
else
'drives hidden -> read it
Call SetUI()
end if
else
'wrong datatype!!! ignore it!
end if
end if
else
Disable
end if
End Sub
Sub SetUI
'Arg! We got to calculate!!!
if (i-32)>=0 then
Call SetUIElement(5,true)
i=i-32
end if
if (i-16)>=0 then
Call SetUIElement(4,true)
i=i-16
end if
if (i-8)>=0 then
Call SetUIElement(3,true)
i=i-8
end if
if (i-4)>=0 then
Call SetUIElement(2,true)
i=i-4
end if
if (i-3)>=0 then
Call SetUIElement(1,true)
end if
End Sub
Sub Plugin_CheckData(ElementIndex)
End Sub
Sub Plugin_Apply(ElementIndex,ElementSubIndex)
i=0
if GetUIElement(1)=true then
i=i+1+2 'hide B also!
end if
if GetUIElement(2)=true then
i=i+4
end if
if GetUIElement(3)=true then
i=i+8
end if
if GetUIElement(4)=true then
i=i+16
end if
if GetUIElement(5)=true then
i=i+32
end if
Call RegWriteValue(sP & sV,i,2)
'Not needed?
'Restart
End Sub
Sub Plugin_Terminate
End Sub